Public Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nindex As Long) As Long

Public Function WIN_XY() As String
    Dim AY%, AX%
        AY = GetDeviceCaps(Form1.hdc, 8) 'Breite
        AX = GetDeviceCaps(Form1.hdc, 10) 'HÃ¶he
    WIN_XY = AY & ":" & AX
End Function